<template>
  <div id="locations" class="body-container appointment-container">
    <!--头部地址选择-->
    <div class="top-banner">
      <div class="appoint-top">
        <router-link class="availableAppointArray" to="/pending" active-class="active">
          <span class="tab-item">待完成</span>
        </router-link>
        <router-link class="unavailableAppointmentArray" to="/expired" active-class="active">
          <span class="tab-item last">已过期</span>
        </router-link>
      </div>
    </div>
    <!--body中的店面地址列表-->
    <div class="content-wrapper">
      <div class="store-items-wrapper">
        <router-view></router-view>
        <loading :appear="loading"></loading>
      </div>
    </div>
  </div>
</template>

<script>
import Config from 'common/script/config.js'
import Loading from 'components/loading/loading'

export default {
  name: 'locations',
  components: {
    Loading
  },
  data () {
    return {
      loading: true,
      willShowAppoint: true,
      avaiableAppointArray: []
    }
  },
  methods: {
  },
  created: function () {
    Config.getReqParam('wechatid')
    // var wechatid = Config.getReqParam('wechatid')
    // this.$http.post('/freescan/wechat/jsSignature', {
    //   'openid': wechatid
    // }).then((response) => {
    //   response = response.body
    // })
    // do some dummy data
    this.loading = false
  }
}
</script>

<style lang="stylus" rel="stylesheet/stylus">
@import '../../common/stylus/mixin'
.appointment-container
  padding-top 66px !important
  .top-banner
    padding 20px 0 !important
    .appoint-top
      font-size 16px
      height 16px
      line-height 16px
    .tab-item
      display inline-block
      width 49%
      text-align center
      border-right 1px solid #999
      &.last
        border none
        width 48%
    .active
      .tab-item
        color #ff850a
  .content-wrapper
    padding-top 0px !important
    box-sizing border-box
    .store-items-wrapper
      position relative
      height 100%
      width 100%
      overflow-x hidden
      overflow-y auto
      .store-items-ul
        margin 0px
        padding 0px

</style>
